﻿@using LaxCraft.Repositories;
@using LaxCraft.Domain;
@using LaxCraft.Helpers;
@model LaxCraft.Domain.Post
@{
    ViewBag.Title = "Scholar Library";
}
<h2>
    Create</h2>
@using (Html.BeginForm())
{
@Html.ValidationSummary(true)
    <fieldset>
        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title) @Html.ValidationMessageFor(model => model.Title)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Body)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Body) @Html.ValidationMessageFor(model => model.Body)
             @{ Html.Telerik().Editor()
                    .Name("editor")
                    .HtmlAttributes(new { style = "height:400px" })
                    .Encode(false)
                    .Value(@<text>
                        <p>
                            <img src="@Url.Content("~/Content/Images/33.png")" alt="Editor for ASP.NET MVC logo" style="display:block;margin-left:auto;margin-right:auto;" />
                            Telerik Editor for ASP.NET MVC allows your users to edit HTML in a familiar, user-friendly way.
                            <br />In this version, the Editor provides the core HTML editing engine, which includes
                        </p>
                        </text>).Render();
                 }
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Tags)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Tags) @Html.ValidationMessageFor(model => model.Tags)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.CreatedBy)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CreatedBy) @Html.ValidationMessageFor(model => model.CreatedBy)
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>